#pragma once
#include <string>
#include <memory>
#include <atomic>
#include "arrow/log.h"

namespace ArrowWebSocket
{

class IMsg
{
protected:
    IMsg();

public:
    virtual ~IMsg();

    /// @brief 返回消息类型 参照common.h
    /// @return 
    virtual int32_t Type() = 0;

    /// @brief 返回消息源信息(暂定格式:任务ID:流地址:元素名称)
    /// @return 
    virtual const std::string& SrcInfo() = 0;

    /// @brief 返回消息内容
    /// @return 
    virtual const std::string& String() = 0;

private:
    static std::atomic<int32_t> sMsgCount;
};

using SharedPtrMsg = std::shared_ptr<IMsg>;
}